using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColliderTools : MonoBehaviour
{
    public Action<Collision> onCollisionEnter;
    public  static ColliderTools Get(GameObject go)
    {
        ColliderTools collider = go.GetComponent<ColliderTools>();
        if (collider == null) collider = go.AddComponent<ColliderTools>();
        return collider;
    }

    void OnCollisionEnter(Collision collision)
    {
        onCollisionEnter?.Invoke(collision);
    }
}
